<template>
  <div>
    <van-swipe :loop="true" class="swipt" autoplay="2000" >
        <van-swipe-item v-for="(v,index) in imgs" :key="index">
          <img :src="v" alt="">
        </van-swipe-item>
       
    </van-swipe>
  </div>
</template>

<script>
export default {
  mounted() {
    this.$http({
      url: " http://localhost:3000/swipe",
      method:"get"
    }).then(res => {
        this.imgs=res.data
      })
  },
  data() {
    return {
        imgs:[]
      }
    }

}
</script>

<style lang="scss" scoped>
  .swipt{
    width: 100vw;
    height: 64vw;
    img{
    height: 64vw;
    }
  }
</style>